package org.luxor.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.validator.group.UpdateGroup;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 菜单
 *
 * @author Mark @date 2020-07-28 14:29:25
 */
@Data
@TableName("tb_sys_menu")
@ApiModel(description = "菜单管理")
public class SysMenuEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键Id")
    @NotNull(message = "菜单ID，不能为空", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @ApiModelProperty(value = "应用ID")
    private String appId;

    @ApiModelProperty(value = "父菜单ID，一级菜单为0")
    private Long parentId;

    @ApiModelProperty(value = "菜单名称")
    @NotNull(message = "菜单名称(name)，不能为空", groups = UpdateGroup.class)
    private String name;

    @ApiModelProperty(value = "菜单路径")
    @NotNull(message = "菜单路径(path)，不能为空", groups = UpdateGroup.class)
    private String path;

    @ApiModelProperty(value = "页面渲染组件")
    private String component;

    @ApiModelProperty(value = "重定向路径")
    private String redirect;

    @ApiModelProperty(value = "授权(多个用逗号分隔，如：user:list,user:create)")
    private String perms;

    @ApiModelProperty(value = "菜单标题")
    private String title;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "内嵌外部网址")
    private String frameSrc;

    @ApiModelProperty(value = "新窗口打开外部网址(1-是；0-否)")
    private Boolean frameBlank;

    @ApiModelProperty(value = "排序")
    private Integer orderNo;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "隐藏(1-隐藏；0-显示)")
    private Boolean hidden;

    @ApiModelProperty(value = "逻辑删除(1-删除，0-未删除)")
    private Boolean deleted;

}
